package com.gang.ssm.bos.system.bean;

import java.util.ArrayList;
import java.util.List;

public class Region {
	private Integer id;

	private String province;

	private String city;

	private String district;

	private String postcode;

	private String shortcode;

	private String citycode;

	private List<Subarea> subareas = new ArrayList<Subarea>();
	
	public String getName() {
		return province + city + district;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province == null ? null : province.trim();
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city == null ? null : city.trim();
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district == null ? null : district.trim();
	}

	public String getPostcode() {
		return postcode;
	}

	public void setPostcode(String postcode) {
		this.postcode = postcode == null ? null : postcode.trim();
	}

	public String getShortcode() {
		return shortcode;
	}

	public void setShortcode(String shortcode) {
		this.shortcode = shortcode == null ? null : shortcode.trim();
	}

	public String getCitycode() {
		return citycode;
	}

	public void setCitycode(String citycode) {
		this.citycode = citycode == null ? null : citycode.trim();
	}

	public void setSubareas(List<Subarea> subareas) {
		this.subareas = subareas;
	}

	public List<Subarea> getSubareas() {
		return subareas;
	}

	public Region(String province, String city, String district, String postcode) {
		this.province = province;
		this.city = city;
		this.district = district;
		this.postcode = postcode;
	}

	public Region() {
	}

	@Override
	public String toString() {
		return "Region [id=" + id + ", province=" + province + ", city=" + city
				+ ", district=" + district + ", postcode=" + postcode
				+ ", shortcode=" + shortcode + ", citycode=" + citycode
				+ ", subareas=" + subareas + "]";
	}

}